home *** CD-ROM | disk | FTP | other *** search
- Path: scoop.eco.twg.com!usenet
- From: mike@vishnu.eco.twg.com (This space intentionally left blank)
- Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
- Subject: Re: C style formatting (was Re: Young programmers read me.)
- Date: 18 Apr 1996 21:50:50 GMT
- Organization: The Wollongong Group
- Message-ID: <4l6dfq$kc@scoop.eco.twg.com>
- References: <4icpp9$7hr@barad-dur.nas.com> <4kvual$26t@butterfly.hjs.com>
- NNTP-Posting-Host: vishnu.eco.twg.com
-
- In article <4kvual$26t@butterfly.hjs.com>, root@butterfly.hjs.com (John Flinchbaugh) writes:
- >> That way you can store the code in "crammed" format to save disk space, and
- >> convert it to your favorite style to work on it...and everyone can look at
- >> it in *their* preferred format and the arguments over where the braces go,
- >> or how many columns to use (80? 132? 547?) can disappear forever.
- >>
- >> Anyone got such a program? Writing it shouldn't be hard if you can define
- >> the style-definition-file format (user interfaces are always the hardest
- >> part :^).
- >
- >There's the 'indent' utility under unix. The version on my linux box
- >is quit comprehensive, letting you define every little detail about
- >the style you might care to set.
-
- Thanks, I'll look for it. Maybe it's protable...
-
- >Warning though, it DOESN'T work on C++ files!
-
- Different syntax, so not surprising. My guess is that the easiest way to
- write such a thing is to build the parse tree as if you were a compiler, and
- then "generate" C code as output from that tree, rather than object code.
- Such a thing will be as language-specific as any compiler.
-
- -- Mike "thanks for the pointer!" Bartman --
-
- ==============================================================================
- | I didn't really say all the things that I said. You probably didn't read |
- | what you thought you read. Statistics show that this whole thing is more |
- | than likely just a hideous misunderstanding. |
- ==============================================================================
-
- ==============================================================================
- Should I or shouldn't I?... Too late, I did!
- ------------------------------------------------------------------------------
-
-